package cn.edu.cxcyzx.algorithm;


/**
 * 计算项目进度
 * @author daier
 *
 */
public class CalProgress_project {
	
	public static final double CREATE_PREJECT=00.00;
	public static final double CREATE_ANALYSE=10.00;
	public static final double TASKS_FINISH=90.00;
	public static final double PROJECT_FINISH=100.00;
	
	public static double getProgress(Integer[] tasks_progress){
		double progress=CREATE_ANALYSE;
		double task=(TASKS_FINISH-CREATE_ANALYSE)/tasks_progress.length;
		for (int pro : tasks_progress) {
			progress=progress+task*(pro/100.00);
		}
		
		return progress;
		
	}
	
	
}
